#include "./operation_linux.h"

Operation_Linux::Operation_Linux()
{

}
int Operation_Linux::ScreenOperation(bool commond)
{
    if(commond == true)
    {

    }
    else
    {

    }
    return 0;
}
int Operation_Linux::PoweroffOperation(int commond)
{
#ifdef __linux__
    if(commond == 1)
    {
        return reboot(RB_HALT_SYSTEM);
        //return system("poweroff");
    }
    else if(commond == 2)
    {
        sync(); //
        return reboot(RB_AUTOBOOT);
    }
    else
    {

    }
#endif
    return 0;
}
